import 'package:beamer/beamer.dart';
import 'package:flutter/material.dart';

class ChildHome extends StatefulWidget {
  final String? id;
  const ChildHome({super.key, this.id});

  @override
  State<ChildHome> createState() => _ChildHomeState();
}

class _ChildHomeState extends State<ChildHome> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("居家"),
        backgroundColor: Colors.teal,
        titleTextStyle: const TextStyle(color: Colors.white),
        leading: IconButton(
          onPressed: () {
            Beamer.of(context).beamBack();
          },
          icon: const Icon(
            Icons.swipe_left,
            color: Colors.white,
          ),
        ),
      ),
      body: Center(
        child: Text('居家頁面 ${widget.id}'),
      ),
    );
  }
}
